<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcoap: async.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">libcoap<span id="projectnumber">&#160;4.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('async_8c.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">async.c File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>state management for asynchronous messages  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;coap_config.h&quot;</code><br />
<code>#include &quot;<a class="el" href="coap_8h_source.html">coap.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="async_8h_source.html">async.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="coap__debug_8h_source.html">coap_debug.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="mem_8h_source.html">mem.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="utlist_8h_source.html">utlist.h</a>&quot;</code><br />
</div>
<p><a href="async_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a873cf0a6cd02fd3b146199dd26e8f0cf" id="r_a873cf0a6cd02fd3b146199dd26e8f0cf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="async_8c.html#a873cf0a6cd02fd3b146199dd26e8f0cf">SEARCH_PAIR</a>(head,  out,  field1,  val1,  field2,  val2)&#160;&#160;&#160;  <a class="el" href="async_8c.html#a67ecb5d953c544e03b9325279285632e">SEARCH_PAIR2</a>(head,out,field1,val1,field2,val2,next)</td></tr>
<tr class="separator:a873cf0a6cd02fd3b146199dd26e8f0cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67ecb5d953c544e03b9325279285632e" id="r_a67ecb5d953c544e03b9325279285632e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="async_8c.html#a67ecb5d953c544e03b9325279285632e">SEARCH_PAIR2</a>(head,  out,  field1,  val1,  field2,  val2,  next)</td></tr>
<tr class="separator:a67ecb5d953c544e03b9325279285632e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7ff79a6925e27b7146184135023e1b40" id="r_ga7ff79a6925e27b7146184135023e1b40"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__async__state__t.html">coap_async_state_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap__async.html#ga7ff79a6925e27b7146184135023e1b40">coap_register_async</a> (<a class="el" href="structcoap__context__t.html">coap_context_t</a> *context, <a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *request, unsigned char flags, void *data)</td></tr>
<tr class="memdesc:ga7ff79a6925e27b7146184135023e1b40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates a new <a class="el" href="structcoap__async__state__t.html">coap_async_state_t</a> object and fills its fields according to the given <code>request</code>.  <br /></td></tr>
<tr class="separator:ga7ff79a6925e27b7146184135023e1b40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabcb03afad78869b28826d780f37c818b" id="r_gabcb03afad78869b28826d780f37c818b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__async__state__t.html">coap_async_state_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap__async.html#gabcb03afad78869b28826d780f37c818b">coap_find_async</a> (<a class="el" href="structcoap__context__t.html">coap_context_t</a> *context, <a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="pdu_8h.html#ac60fb9284ace878df3db4a2d621d9a8d">coap_tid_t</a> id)</td></tr>
<tr class="memdesc:gabcb03afad78869b28826d780f37c818b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the object identified by <code>id</code> from the list of asynchronous transactions that are registered with <code>context</code>.  <br /></td></tr>
<tr class="separator:gabcb03afad78869b28826d780f37c818b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadec4e4c177dd62a1853360ddbf69258e" id="r_gadec4e4c177dd62a1853360ddbf69258e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap__async.html#gadec4e4c177dd62a1853360ddbf69258e">coap_remove_async</a> (<a class="el" href="structcoap__context__t.html">coap_context_t</a> *context, <a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="pdu_8h.html#ac60fb9284ace878df3db4a2d621d9a8d">coap_tid_t</a> id, <a class="el" href="structcoap__async__state__t.html">coap_async_state_t</a> **s)</td></tr>
<tr class="memdesc:gadec4e4c177dd62a1853360ddbf69258e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes the state object identified by <code>id</code> from <code>context</code>.  <br /></td></tr>
<tr class="separator:gadec4e4c177dd62a1853360ddbf69258e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga32024a34a383832e6692d3a439fc67c7" id="r_ga32024a34a383832e6692d3a439fc67c7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__coap__async.html#ga32024a34a383832e6692d3a439fc67c7">coap_free_async</a> (<a class="el" href="structcoap__async__state__t.html">coap_async_state_t</a> *s)</td></tr>
<tr class="memdesc:ga32024a34a383832e6692d3a439fc67c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases the memory that was allocated by coap_async_state_init() for the object <code>s</code>.  <br /></td></tr>
<tr class="separator:ga32024a34a383832e6692d3a439fc67c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>state management for asynchronous messages </p>

<p class="definition">Definition in file <a class="el" href="async_8c_source.html">async.c</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a873cf0a6cd02fd3b146199dd26e8f0cf" name="a873cf0a6cd02fd3b146199dd26e8f0cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a873cf0a6cd02fd3b146199dd26e8f0cf">&#9670;&#160;</a></span>SEARCH_PAIR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEARCH_PAIR</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">head, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">out, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">field1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">val1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">field2, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">val2&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;  <a class="el" href="async_8c.html#a67ecb5d953c544e03b9325279285632e">SEARCH_PAIR2</a>(head,out,field1,val1,field2,val2,next)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="async_8c_source.html#l00024">24</a> of file <a class="el" href="async_8c_source.html">async.c</a>.</p>

</div>
</div>
<a id="a67ecb5d953c544e03b9325279285632e" name="a67ecb5d953c544e03b9325279285632e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67ecb5d953c544e03b9325279285632e">&#9670;&#160;</a></span>SEARCH_PAIR2</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEARCH_PAIR2</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">head, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">out, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">field1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">val1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">field2, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">val2, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">next&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">  <span class="keywordflow">do</span> {                                                                  \</div>
<div class="line">    LL_FOREACH2(head,out,next) {                                        \</div>
<div class="line">      if ((out)-&gt;field1 == (val1) &amp;&amp; (out)-&gt;field2 == (val2)) <span class="keywordflow">break</span>;    \</div>
<div class="line">    }                                                                   \</div>
<div class="line">} <span class="keywordflow">while</span>(0)</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="async_8c_source.html#l00027">27</a> of file <a class="el" href="async_8c_source.html">async.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="async_8c.html">async.c</a></li>
    <li class="footer">Generated on Fri Dec 27 2024 09:57:44 for libcoap by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
  </ul>
</div>
</body>
</html>
